package operands;

import instructions.Instruction;

public class DirectOperand extends Operand 
{
	public DirectOperand(int value) 
	{
		super(value);
	}

	@Override
	public int resolve() 
	{
		return instruction.getAddres() + value;
	}
	
	@Override
	public Operand copy() 
	{
		return new DirectOperand(value);
	}

	@Override
	public Instruction resolveInstruction() {
		
		return this.memory.getInstruction(this.instruction.getAddres()+value);
	}
}
